<h1 mat-dialog-title>Job Task Definition</h1>
<form [formGroup]="jobTaskDefinitionForm" (submit)="onSubmit()">
    <div mat-dialog-content>

        <mat-progress-bar mode='indeterminate' *ngIf='loading'></mat-progress-bar>

        <mat-form-field class="full-width-input">
            <mat-label>Id</mat-label>
          <input matInput formControlName="id">
        </mat-form-field>

        <app-job-task-definition-form [jobTaskDefinition]="jobTaskDefinition" [disableForm]="!editing" [isDeletion]="jobTaskDefinition.isDeletion" (formReady)="onFormReady($event)"></app-job-task-definition-form>
      </div>
      <div mat-dialog-actions>
          <button mat-button cdkFocusInitial *ngIf="!editing" (click)="onEditClick()">Edit</button>
          <button mat-button cdkFocusInitial *ngIf="editing">Save</button>
          <button mat-button [mat-dialog-close]="false" *ngIf="!editing">Close</button>
          <button mat-button *ngIf="editing" (click)="onCancelClick()">Cancel</button>
      </div>
</form>
